var rootUrl = require('../config/root.url.config');

function loginFilter(req,res,next){
    console.log('info:login filter inteceptor a request!');
    var user = req.session.user;
    if(!user){
        res.json({noLogin:true});
    }else {
        next();
    }
}

module.exports = loginFilter;